Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use terser-webpack-plugin instead of uglifyjs-webpack-plugin #1816

Merged
merged 4 commits into from
Dec 1, 2018

Conversation

banyan
Copy link
Contributor

@banyan banyan commented Nov 29, 2018

webpack and create-react-app switched from uglifyjs-webpack-plugin to terser-webpack-plugin. The reason is well written at webpack/webpack#8036 (comment). what do you think about to switch?

refs: https://twitter.com/dan_abramov/status/1060122100340588545


we don't need a workaround as create-react-app does at https://github.com/facebook/create-react-app/blob/5352a0c/packages/react-scripts/config/webpack.config.js#L204-L208 since it's fixed and we use terser version 3.10.12 in this PR.

@jakeNiemiec
Copy link
Member

For some popular, asset heavy libraries, uglifyjs-webpack-plugin produces show-stopping issues (e.g.: Font Awesome):
https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking#issues
FortAwesome/Font-Awesome#13260

Thanks for this PR.

@gauravtiwari gauravtiwari merged commit 0d36af9 into rails:master Dec 1, 2018
@gauravtiwari
Copy link
Member

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants